/**
 * Example 2 : Play tag with attributes.
 * 
 * Attributes must be declared in the tag library descriptor, set as a class wide variable in the tag class with an accessor 
 * that uses the same name as declared in the tag library descriptor, and if the attribute is required, given a value when the 
 * tag is initialized in the JSP. If the tag in the tag library descriptor looked like this:
 * 
 */
package com.wang.taglib;

public class HelloAttributeTaglib extends HelloTaglib
{
	private static final long serialVersionUID = -3621504640096487473L;
	private String name;
	private String greeting;

	public void setName(String name)
	{
		this.name = name;
	}
	public void setGreeting(String greeting)
	{
		this.greeting = greeting;
	}
	
	@Override
	public String getGreeting()
	{
		return "Hello " + name + (null==greeting?"":(", " + greeting));
	}
}
